package cn.edu.wynu.oop.defclass;

public class TestConstruct {
    int testInt;
    String testString;

    void testMethod() {
        System.out.println("test");
    }

    public TestConstruct() {
        System.out.println("无参构造器");
    }

    public TestConstruct(int testInt) {
        this.testInt = testInt;
        System.out.println("第一个参数构造器");

    }

    public TestConstruct(String testString) {
        this.testString = testString;
        System.out.println("第二个参数构造器");
    }

    public TestConstruct(int testInt, String testString) {
        this.testInt = testInt;
        this.testString = testString;
        System.out.println("全部参数构造器");
    }

    public static void main(String[] args) {
        TestConstruct noArgTest = new TestConstruct();
        TestConstruct firstArgTest = new TestConstruct(12);
        TestConstruct secondArgTest = new TestConstruct("12");
        TestConstruct allArgTest = new TestConstruct(12,"12");
    }
}
